package com.mark.design.pattern.creational.prototype;

import java.text.MessageFormat;

/**
 * Created by Choisaaaa on 2018/8/20.
 */
public class MailUtil {
    public static void sendMail(Mail mail) {
        String outputContent = "向{0}同学，邮件地址{1}，邮件内容：{2}  发送邮件";
        System.out.println(MessageFormat.format(outputContent,
                mail.getName(),
                mail.getEmailAddress(),
                mail.getContent()));
    }

    public static void saveOriginMailRecord(Mail mail) {
        System.out.println("存储Origin记录，originMail"+mail.getContent());
    }

}
